<?php
namespace app\common\service;

use app\common\model\ProductData as ProductDataModel;

class ProductData{

    public function allByProductId($productId){
        $productDataModel = new ProductDataModel();
        $productData = $productDataModel -> where("productid",$productId)->select();
        return $productData;
    }

    public function find($id){
        $productDataModel = new ProductDataModel();
        $productData = $productDataModel ->find($id);
        return $productData;
    }


    public function insert($data){
        $productDataModel = new ProductDataModel();
        return $productDataModel -> insert($data);
    }
}